The current invention relates to multi-layered image file formats and in particular multi-layer image files which are intended to be displayed as an animation, or alternatively, in the context of a multi-layer composite image.
Multi-layer (or multi-page) images can be thought of as a set of images, all typically but not necessarily the same size, which are somehow combined for the purpose of displaying on an output display device 114. Thus multi-layer refers to multiple images in a single file. Each image in the file is referred to as a layer There are currently two significant applications areas for which multi-layer images are used and they include:
image editing and graphic design; and
animation, especially animation in web pages on the Internet.
In the area of image editing and graphic design, multi-layer images allow a composition of complex scenes as different images are layered over each other. In this case it is usual for each layer to have an opacity (or alpha) channel associated with it. To display the various layers (images) on a display device 114 a first layer (typically a background image) is rendered and subsequent layer is then composited upon the first layer, for example, according to the following equations.
Ac=1xe2x88x92(1xe2x88x92At)(1xe2x88x92Ab)xe2x80x83xe2x80x83(1)
s=At/Acxe2x80x83xe2x80x83(2)
t=(1xe2x88x92At)Ab/Acxe2x80x83xe2x80x83(3)
Rc=sRt+tRbxe2x80x83xe2x80x83(4)
Gc=sGt+tGbxe2x80x83xe2x80x83(5)
Bc=sBt+tBbxe2x80x83xe2x80x83(6)
In the above equations: the background image is specified in the RGBA (Red, Green, Blue and Alpha) colour space as (Rb, Gb, Bb Ab); a foreground (or top) image is specified in the RGBA colour space as (Rt, Gt, Bt, At); and the output or composite image is specified in the RGBA colour space as (Rc, Gc, Bc, Ac). Each subsequent (or new) layer is taken to be a foreground image until it is combined (composited) with a previous layer, wherein the combination is then taken to be a (new) background image. In this manner it is possible to combine a number of layers by sequential applications of equations (4-6) to each new layer in turn in order to form a final composite image. Other compositing operations are also possible however the one described herein-before with reference to equations (1) to (6) is the most commonly used.
The other noteworthy application of multi-layer images, noted above, is animation. For this purpose, currently, the most widely used file format is the Graphics Interchange Format (GIF). The GIF also contains layers (or multiple images) which are composited in sequence order. Each layer of a GIF file may be of different size and is positioned using offset coordinates in order to improve storage efficiency in cases where only small areas contain changes from one layer to the next. The GIF standard defines a virtual screen upon which each layer is composited. It uses a control block structure to indicate how the layers in the file are to be displayed. Each layer of the file format is preceded by a control block which contains: information about the location of the top left corner in the virtual screen, information on how long the layer should be displayed before proceeding to the next layer in the file; and whether the layer should be removed prior to display of a next layer in the file. This (control block based) structure allows for particularly simple software implementation of the decoder. In fact very little additional coding is required to implement a GIF decoder capable of correctly displaying multi-layer animated GIF images.
The animation scheme employed by GIF has been adopted widely in a very short space of time. The primary reason for this is the simple and restricted design. These features make it easy for a large number of independent developers to implement file viewers capable of handling GIF animations. However the simplicity of GIF comes at the price of efficiency in coding. For example, as each layer in an animated GE file corresponds to a single display frame, animation using sprites and overlays is not coded efficiently. This is because each frame must be present as a separate image layer. Images that are reused through the course of an animation must appear once in the file for each frame they appear in.
More recently, the Multiple Image Network Graphics (MNG) file format, which is still being developed, has attempted to address this problem. MNG defines an animation framework based on extensions to the Portable Network Graphics (PNG) file format. However, while MNG permits the reuse of layers, much of the simplicity that characterised the success of GIF is lost. In addition, the methods used by MNG to describe the animation do not lead naturally to an implementation model. This makes the development of viewers for MNG animations notably more difficult to implement. To help address this problem the creators of MNG have proposed low complexity and very low complexity subsets of the fill MNG standard. The problem with this however is that the low complexity subsets achieve little more functionality than GIF and have the same coding efficiency problems.
It is an object of the present invention to substantially overcome, or at least ameliorate, one or more disadvantages of existing arrangements.
According to a first aspect of the invention, there is provided a method of processing a multi-layer image file comprising (i) a first plurality of image layers, and (ii) a second plurality of control blocks, said processing producing an animation sequence, said method comprising steps of:
providing a plurality of control blocks in said image file, each control block being associated with at least one of said image layers, wherein each control block is characterised by an information control field indicating which one of said control blocks and associated image layers to loop back to; and
sequentially executing each control block and looping back to a previous control block and associated layer in said execution sequence in accordance with the indication provided by said information control field.
According to a another aspect of the invention, there is provided a method of animating a sequence of images, wherein said images are contained in a single multi-layer file, the method comprising the steps of:
a) providing a plurality of control blocks in said image file, each control block being associated with at least one of said images, wherein each control block is characterized by an information control field indicating which one of said images is next in sequence, and at least one control block having an information control field indicating a previous image in the sequence;
b) reading a current information control field from a current control block;
c) displaying the image associated with the current control block;
d) if the current information control field indicates a loop-back to a previous image then taking the control block of the previous image as the current control block, otherwise taking the control block of a next image in the sequence as the current control block; and
e) repeating steps b) through to e).
According to a another aspect of the invention, there is provided a method for providing an animation of one or more images of a plurality of images, said method comprising steps of:
storing said plurality of images in a first order;
determining a commencing image of said animation;
determining a commencing address for the commencing image;
establishing an animation order for said one or more images, said animation order commencing with said commencing image;
animating said one or more images dependent upon said animation order, using to relative addressing referred to said commencing address; and
reusing at least one image of said one or more images, if said at least one image occurs more than once in the animation order.
According to a another aspect of the invention, there is provided a method of processing a multi-layer image file comprising (i) a first plurality of image layers, and (ii) a second plurality of control blocks, said processing producing an animation sequence, said method comprising steps of:
processing an image layer in accordance with a corresponding control block, thereby providing an image for said animation sequence;
tagging the image layer for reprocessing, if the image layer is to be used again in the image sequence, said tagging using a relative address referred to an address of said corresponding control block;
re-using said image layer in accordance with a next control block, thereby providing a next image for the animation sequence, if said relative address is a next address to the address of said corresponding control block; and
using a next image layer in accordance with said next control block, thereby providing said next image for the animation sequence, if said relative address is a subsequent address to said next address.
According to a another aspect of the invention, there is provided a method of processing a multi-layer image file comprising (i) a first plurality of image layers, and (ii) a second plurality of control blocks, said processing producing an animation sequence, said method comprising steps of:
processing an image layer in accordance with a corresponding control block, thereby providing an image for said animation sequence;
tagging the image layer for reprocessing, if the image layer is to be used again in the image sequence, said tagging using a relative address referred to an address of said corresponding control block;
re-using said image layer in accordance with a later control block, thereby providing a later image for the animation sequence, if said relative address is a later address referred to the address of said corresponding control block; and
using a next image layer in accordance with a next control block, thereby providing a next image for the animation sequence, if said relative address is a subsequent address to said next address.
According to a another aspect of the invention, there is provided an apparatus for processing a multi-layer image file comprising (i) a first plurality of image layers, and (ii) a second plurality of control blocks, said processing producing an animation sequence, said apparatus comprising:
processing means for processing an image layer in accordance with a corresponding control block, thereby providing an image for said animation sequence;
tagging means for tagging the image layer for reprocessing, if the image layer is to be used again in the image sequence, said tagging using a relative address referred to an address of said corresponding control block; and
re-use means for re-using said image layer in accordance with a next control block, thereby providing a next image for the animation sequence, if said relative address is a next address to the address of said corresponding control block.
According to a another aspect of the invention, there is provided an apparatus adapted to animate one or more images of a plurality of images, said apparatus comprising:
a file structure means for storing said plurality of images in a first order;
an anchor address means for determining a commencing address of a commencing image of said one or more images;
an instruction set means for establishing an animation order for said one or more images using relative addressing referred to said commencing address;
an animation means for providing an animation of said one or more images in said animation order; and
image re-use means for re-using at least one image of said one or more images if said at least one image occurs more than once in said animation order.
According to a another aspect of the invention, there is provided a multi-layer image file encoded for animation, said image file comprising:
a first plurality of image layers; and
a second plurality of control blocks; wherein an image layer is processed in accordance with a corresponding control block, thereby providing an image for said animation sequence; and wherein
the image layer is tagged for reprocessing, if the image layer is to be used again in the image sequence, said tagging using a relative address referred to an address of said corresponding control block.
According to a another aspect of the invention, there is provided a multi-layer image file comprising:
(a) a plurality of images stored in a first order;
(b) a first animation instruction for execution, said first animation instruction comprising:
(i) a commencing address of a commencing image of said plurality of images to be animated;
(ii) at least one animation attribute of said commencing image.
(c) at least one next animation instruction to be executed, said first animation instruction and said at least one next animation instruction being executed in a sequential order, each said at least one next animation instruction comprising:
(i) a relative address of a next image of said plurality of images to be animated, said relative address being referred to one of said commencing address and a preceding relative address;
(ii) at least one animation attribute of said next image.
According to a another aspect of the invention, there is provided a computer readable memory medium for storing a program for apparatus which processes a multi-layer image file comprising (i) a first plurality of image layers, and (ii) a second plurality of control blocks, said processing producing an animation sequence, said program comprising:
code for a processing step for processing an image layer in accordance with a corresponding control block, thereby providing an image for said animation sequence; and
code for a tagging step for tagging the image layer for reprocessing, if the image layer is to be used again in the image sequence, said tagging using a relative address referred to an address of said corresponding control block.